package collections;

import java.util.ArrayList;
import java.util.Collections;

public class demo {
	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<>();
		
		Collections.addAll(list,"2", "5", "2", "3","8","9");//添加多个元素
		System.out.println(list);
		
		
		Collections.shuffle(list);//打乱顺序
		System.out.println(list);
		
		Collections.sort(list);//默认排序，升序
		System.out.println(list);
	}
}
